//alert("加载了XMLHttpRequest!");

var JITHTTPCLIENT = function () {
    var xmlHttp = null;
    var url = "http://127.0.0.1:45679";  
//	var url = "https://127.0.0.1:45680";  
    var FinalizeCmd = "{\"name\": \"Finalize\"}";    
    var ClearPinCodeCmd = "{\"name\": \"ClearPinCode\"}";        
    var GeterrocodeCmd = "{\"name\": \"GetErrorCode\"}";    
    var GetDataCmd = "{\"name\": \"GetData\"}";	
    var GetVersionCmd = "{\"name\": \"JITGetVersion\"}";
    var GetMacCmd = "{\"name\": \"JITGetMAC\"}";	
    var ReStartServerCmd = "{\"name\": \"ReStartSever\"}";
    
	var strinitParam = "<?xml version=\"1.0\" encoding=\"utf-8\"?>"+
		 	              "<authinfo><liblist>"+
										"<lib type=\"CSP\" version=\"1.0\" dllname=\"\" ><algid val=\"SHA1\" sm2_hashalg=\"sm3\"/></lib>"+
										"<lib type=\"SKF\" version=\"1.1\" dllname=\"R0FLRVlfU0tGLmRsbA==\" ><algid val=\"SHA1\" sm2_hashalg=\"sm3\"/></lib>"+					//GAKEY_SKF.dll    公安驱动 
										"<lib type=\"SKF\" version=\"1.1\" dllname=\"bXRva2VuX2dtMzAwMF9KSVQuZGxs\" ><algid val=\"SHA1\" sm2_hashalg=\"sm3\"/></lib>"+			//mtoken_gm3000_JIT.dll  龙脉驱动
										"<lib type=\"SKF\" version=\"1.1\" dllname=\"SERfR01DQUlTLmRsbA==\" ><algid val=\"SHA1\" sm2_hashalg=\"sm3\"/></lib>"+					//HD_GMCAIS.dll		
										"<lib type=\"SKF\" version=\"1.1\" dllname=\"U2h1dHRsZUNzcDExXzMwMDBHTS5kbGw=\" ><algid val=\"SHA1\" sm2_hashalg=\"sm3\"/></lib>"+		//ShuttleCsp11_3000GM.dll 	飞天标准key
										"<lib type=\"SKF\" version=\"1.1\" dllname=\"SklUR01LRVlfU0pLMTQyNC5kbGw=\" ><algid val=\"SHA1\" sm2_hashalg=\"sm3\"/></lib>"+			//JITGMKEY_SJK1424.dll		飞天OEMkey
										"<lib type=\"SKF\" version=\"1.1\" dllname=\"U0tGQVBJMjAwNzkuZGxs\" ><algid val=\"SHA1\" sm2_hashalg=\"sm3\"/></lib>"+					//SKFAPI20079.dll			海泰
										"<lib type=\"SKF\" version=\"1.1\" dllname=\"bGliZXNfMzAwMGdtX0pJVC5zbw==\" ><algid val=\"SHA1\" sm2_hashalg=\"sm3\"/></lib>"+			//libes_3000gm_JIT.so		龙脉
										"<lib type=\"SKF\" version=\"1.1\" dllname=\"U3hjYUNzcDExXzMwMDBHTV9zLmRsbA==\" ><algid val=\"SHA1\" sm2_hashalg=\"sm3\"/></lib>"+		//SxcaCsp11_3000GM_s.dll	
										"<lib type=\"SKF\" version=\"1.1\" dllname=\"U0tGQVBJLmRsbA==\" ><algid val=\"SHA1\" sm2_hashalg=\"sm3\"/></lib>"+						//SKFAPI.dll				
										"<lib type=\"SKF\" version=\"1.1\" dllname=\"bXRva2VuX2dtMzAwMC5kbGw=\" ><algid val=\"SHA1\" sm2_hashalg=\"sm3\"/></lib>"+				//mtoken_gm3000.dll			龙脉
										"<lib type=\"SKF\" version=\"1.1\" dllname=\"U21hcnRDVENBUElISUQuZGxs\" ><algid val=\"SHA1\" sm2_hashalg=\"sm3\"/></lib>"+				//SmartCTCAPIHID.dll		中孚
										"<lib type=\"SKF\" version=\"1.1\" dllname=\"RlJJRHJpdmVyU0tGMi5kbGw=\" ><algid val=\"SHA1\" sm2_hashalg=\"sm3\"/></lib>"+				//FRIDriverSKF2.dll			
										"<lib type=\"SKF\" version=\"1.1\" dllname=\"U3hjYUNzcDExXzMwMDBHTS5kbGw=\" ><algid val=\"SHA1\" sm2_hashalg=\"sm3\"/></lib>"+			//SxcaCsp11_3000GM.dll		
										"<lib type=\"SKF\" version=\"1.1\" dllname=\"V0RTS0ZfQ05QQ3Y1LjEuZGxs\" ><algid val=\"SHA1\" sm2_hashalg=\"sm3\"/></lib>"+				//WDSKF_CNPCv5.1.dll		
										"<lib type=\"SKF\" version=\"1.1\" dllname=\"U0tGX0lCLmRsbA==\" ><algid val=\"SHA1\" sm2_hashalg=\"sm3\"/></lib>"+						//SKF_IB.dll				一元
										"<lib type=\"SKF\" version=\"1.1\" dllname=\"TmV0Y2FTS0YuZGxs\" ><algid val=\"SHA1\" sm2_hashalg=\"sm3\"/></lib>"+                      //                          网证通
										"</liblist></authinfo>";	
										

    function createXmlHttp() {
	  	  var temphttp = null;  
	  	  //用来判断浏览器是否支持ActiveX控件
        //"ActiveXObject" in window是为了兼容IE11，IE11不支持window.ActiveXObject，会提示undefined   
        if (window.ActiveXObject || "ActiveXObject" in window) {
            var arr = new Array("Microsoft.XMLHTTP", "MSXML2.XMLHTTP.6.0", "MSXML2.XMLHTTP.5.0", "MSXML2.XMLHTTP.4.0", "MSXML2.XMLHTTP.3.0", "MSXML2.XMLHTTP.2.6", "MSXML2.XMLHTTP");
            for (var i = 0; i < arr.length; i++) {
                try {
                    temphttp = new ActiveXObject(arr[i]);
                    break;
                } catch (e) {
                    alert(e.message);
                }
            }
        } else if (window.XMLHttpRequest) {
            temphttp = new XMLHttpRequest();
        }
        return temphttp;   
    }
    
    function createXHR() {
        if (typeof XMLHttpRequest != "undefined") {
        	  //alert(1);
            return new XMLHttpRequest(); //IE7+和其他浏览器支持的
        } else if (typeof ActiveXObject != "undefined") { //IE7-支持的
            if (typeof arguments.callee.activeXString != "string") {
                var versions = ["MSXML2.XMLHttp.6.0", "MSXML2.XMLHttp.3.0", "MSXML2.XMLHttp"], i, len;
                for (i = 0, len = versions.length; i < len; i++) {
                    try {
                        new ActiveXObject(versions[i]);                        
                        arguments.callee.activeXString = versions[i];
                        alert(arguments.callee.activeXString);
                        break;
                    } catch (e) {
                        alert(e.message);
                    }
                }
            }
            return new ActiveXObject(arguments.callee.activeXString); //返回ActiveXObject对象
        } else { //全部不支持，抛出错误
            throw new Error("don't support XMLHttpRequest");
        }
    } 
    
    function _sleep(numberMillis) {
				var now = new Date();
				var exitTime = now.getTime() + numberMillis;
				while (true) {
					now = new Date();
					if (now.getTime() > exitTime)
					return;
	      }
    }
    
    function DisConn() {
        xmlHttp.abort();
    }
    
    function Ajax(senddata) { 
    	  var errormsg = "{\"error\":999,\"value\":\"与服务断开连接\"}";  
        //1.创建Ajax对象
        //xmlHttp = createXmlHttp();
        xmlHttp = createXHR();
        
		    //2.连接服务器 open方法只是启动一个请求以备发送，还未发送
        xmlHttp.open("POST", url, false);//false: 同步
        
        //打开下面这句可以测试chrome OPTIONS 跨域
        //xmlHttp.setRequestHeader('content-type','application/json');
        
        //3.发送请求    
        try{
		    //consol+e.log("senddata: " + senddata);
			    xmlHttp.send(senddata);   
			  }catch(e) {
			  //console.log("DisConn Exception: " + e + ", status = " + xmlHttp.status + ", responseText: " + xmlHttp.responseText);
				  DisConn();	
			    
          return errormsg;		    
			  };       
			  
        //4.接收返回值 和服务器通讯的时候此事件发生	 
        if(xmlHttp.readyState == 4 && (xmlHttp.status == 200 || xmlHttp.status == 0))
        {
            if (xmlHttp.responseText == null) 
            {
                return errormsg;
            }                
            return xmlHttp.responseText;
        }else{
			  //console.log("return: " + xmlHttp.status + "===" +senddata + "==="+xmlHttp.responseText+"==="+xmlHttp.readyState);
					return errormsg;	
        }       
    }
         
	  function _Getretcode(Cmdname){
	  	var ret = -1;
	  	var str = Ajax(Cmdname);
		  ret = JSON.parse(str).error;
	  	return ret;	  	
	  }
	  
	  function _Getretmsg(Cmdname){
	  	var ret = "";
	  	var str = Ajax(Cmdname);
		  ret = JSON.parse(str).value;
	  	return ret;	  	
	  }	  
	  
	  function _Getretvalue(Cmdname){
	  	var ret = "";
	  	var str = Ajax(Cmdname);
		  ret = "返回信息："+JSON.parse(str).value + "     返回错误码："+JSON.parse(str).error;
	  	return ret;	  	
	  }	
  
	  
	  return {
	  	     //common
					 Initialize: function () {
					 	  var InitCmd = {name: "Initialize", p1: strinitParam};
						  var InitCmdJson = JSON.stringify(InitCmd);//转换为json字符串
					 	  return _Getretcode(InitCmdJson);
           },
           Finalize: function () {
           		return _Getretcode(FinalizeCmd);
           },
           RegisterParam: function () {
					 	  var RegisterParamCmd = {name: "RegisterParam", p1: strinitParam};
						  var RegisterParamCmdJson = JSON.stringify(RegisterParamCmd);//转换为json字符串
					 	  return _Getretcode(RegisterParamCmdJson);
           },
           GetErrorCode: function () {
           		return _Getretcode(GeterrocodeCmd);
           },
           GetErrorMessage: function (errorcode) {
           	  var GeterromessageCmd = "{\"name\": \"GetErrorMessage\", \"p1\": \""+errorcode+"\"}";
           		return _Getretmsg(GeterromessageCmd);
           },        
           VerifyPinCode: function  (strPinCode, strNewPinCode) {
           	  var VerifyPinCodeParamCmd = "{\"name\": \"VerifyPinCode\", \"p1\": \""+strPinCode+"\", \"p2\": \""+strNewPinCode+"\"}";
					 	  return _Getretcode(VerifyPinCodeParamCmd);
           },  
           //org
           SetCertChooseType: function (types) {
           		var SetCertChooseTypeCmd = "{\"name\": \"SetCertChooseType\", \"p1\": "+types+"}";
           		return _Getretcode(SetCertChooseTypeCmd);	
           },           
           ClearPinCode: function () {
           		return _Getretcode(ClearPinCodeCmd);
           },
           SetPinCode: function (strpincode) {
           	  var SetPinCodeCmd = "{\"name\": \"SetPinCode\", \"p1\": \""+strpincode+"\"}";
           		return _Getretcode(SetPinCodeCmd);
           },
           SetCert: function (strCertType,strDN,strSN,strEmail,strDNIssuer,strCertBase64){
           		var SetCertCmd = "{\"name\": \"SetCert\", \"p1\": \""+strCertType+"\", \"p2\": \""+strDN+"\", \"p3\": \""+strSN+"\", \"p4\": \""+strEmail+"\", \"p5\": \""+strDNIssuer+"\", \"p6\": \""+strCertBase64+"\"}";
           		return _Getretcode(SetCertCmd);	
           },
           SetCert2: function (strCertType,strDN,strSN,strEmail,strDNIssuer,strCertBase64,strCertNameType){
           		var SetCert2Cmd = "{\"name\": \"SetCert2\", \"p1\": \""+strCertType+"\", \"p2\": \""+strDN+"\", \"p3\": \""+strSN+"\", \"p4\": \""+strEmail+"\", \"p5\": \""+strDNIssuer+"\", \"p6\": \""+strCertBase64+"\", \"p7\": \""+strCertNameType+"\"}";
           		return _Getretcode(SetCert2Cmd);	
           },
           SetCertEx: function (strCertStoreType, strCertType,strDN,strSN,strEmail,strDNIssuer,strCertBase64){
           		var SetCertExCmd = "{\"name\": \"SetCertEx\", \"p1\": \""+strCertStoreType+"\", \"p2\": \""+strCertType+"\", \"p3\": \""+strDN+"\", \"p4\": \""+strSN+"\", \"p5\": \""+strEmail+"\", \"p6\": \""+strDNIssuer+"\", \"p7\": \""+strCertBase64+"\"}";
           		return _Getretcode(SetCertExCmd);	
           },
           P1SignStr: function (strdn,strsrc) {
           	  var P1SignStrCmd = {name:"P1SignStr",p1:strdn, p2:strsrc};
			  var P1SignStrCmdJson = JSON.stringify(P1SignStrCmd);//转换为json字符串
           		return _Getretmsg(P1SignStrCmdJson);
           },
           AttachSignStr: function (strdn,strsrc) {
           	  var AttachSignStrCmd = {name:"AttachSignStr",p1:strdn, p2:strsrc};
			  var AttachSignStrCmdJson = JSON.stringify(AttachSignStrCmd);//转换为json字符串
           		return _Getretmsg(AttachSignStrCmdJson);
           },
           DetachSignStr: function (strdn,strsrc) {
           	  var DetachSignStrCmd = {name:"DetachSignStr",p1:strdn, p2:strsrc};
			  var DetachSignStrCmdJson = JSON.stringify(DetachSignStrCmd);//转换为json字符串
           		return _Getretmsg(DetachSignStrCmdJson);
           },
           VerifyAttachedSign: function (strSignedData) {
           	  var VerifyAttachedSignCmd = "{\"name\": \"VerifyAttachedSign\", \"p1\": \""+strSignedData+"\"}";
           		return _Getretcode(VerifyAttachedSignCmd);
           },           
           VerifyDetachedSignStr: function (strSignedData,strsrc) {
           	  var VerifyDetachedSignStrCmd = "{\"name\": \"VerifyDetachedSignStr\", \"p1\": \""+strSignedData+"\", \"p2\": \""+strsrc+"\"}";
           		return _Getretcode(VerifyDetachedSignStrCmd);
           },
           EncryptEnvelopStr: function (strdn,strsrc) {
           	  var EncryptEnvelopStrCmd = {name:"EncryptEnvelopStr",p1:strdn, p2:strsrc};
			  var EncryptEnvelopStrCmdJson = JSON.stringify(EncryptEnvelopStrCmd);//转换为json字符串
           		return _Getretmsg(EncryptEnvelopStrCmdJson);
           },
           DecryptEnvelop: function (strEnvelop) {
           	  var DecryptEnvelopStrCmd = "{\"name\": \"DecryptEnvelop\", \"p1\": \""+strEnvelop+"\"}";
           		return _Getretcode(DecryptEnvelopStrCmd);
           },
           Digest: function (strSrcData) {
           	  var DigestCmd = "{\"name\": \"Digest\", \"p1\": \""+strSrcData+"\"}";
           		return _Getretmsg(DigestCmd);
           },
           CreateSignedEnvelopStr: function (strSignCertDN, strEncCertDN, strSrc) {
           	  var CreateSignedEnvelopStrCmd = {name:"CreateSignedEnvelopStr",p1:strSignCertDN, p2:strEncCertDN, p3:strSrc};
			  var CreateSignedEnvelopStrCmdJson = JSON.stringify(CreateSignedEnvelopStrCmd);//转换为json字符串
           		return _Getretmsg(CreateSignedEnvelopStrCmdJson);
           },
           VerifySignedEnvelop: function (strEnvelop) {
           	  var VerifySignedEnvelopCmd = "{\"name\": \"VerifySignedEnvelop\", \"p1\": \""+strEnvelop+"\"}";
           		return _Getretcode(VerifySignedEnvelopCmd);
           },
           GetCertInfo: function (strCertType,lInfoType,strOID){
           		var GetCertInfoCmd = "{\"name\": \"GetCertInfo\", \"p1\": \""+strCertType+"\", \"p2\": "+lInfoType+", \"p3\": \""+strOID+"\"}";	
           		return _Getretmsg(GetCertInfoCmd);
           },           
           SetAlgorithm: function (strHashAlg, strEncAlg){ 
           	  var SetAlgorithmCmd = "{\"name\": \"SetAlgorithm\", \"p1\": \""+strHashAlg+"\", \"p2\": \""+strEncAlg+"\"}";	              		
           		return _Getretcode(SetAlgorithmCmd);
           },
           SymmetricEncrypt: function (strSymmetricKey, strSrcData, isPad){ 
              var SymmetricEncryptCmd = {name:"SymmetricEncrypt",p1:strSymmetricKey, p2:strSrcData,p3:isPad};   
              var SymmetricEncryptCmdJson = JSON.stringify(SymmetricEncryptCmd);      
              return _Getretmsg(SymmetricEncryptCmdJson);
           },
           SymmetricDecrypt: function (strSymmetricKey, strEncryptData, isPad){ 
              var SymmetricDecryptCmd = {name:"SymmetricDecrypt",p1:strSymmetricKey, p2:strEncryptData,p3:isPad};
              var SymmetricDecryptCmdJson = JSON.stringify(SymmetricDecryptCmd);
              return _Getretmsg(SymmetricDecryptCmdJson);
           },
           GetCertList: function (strCertType, strCertDN, strCertSN, strCertEmail, strCertIssuerDN, lInfoType){ 
           	  var GetCertListCmd = "{\"name\": \"GetCertList\", \"p1\": \""+strCertType+"\", \"p2\": \""+strCertDN+"\", \"p3\": \""+strCertSN+"\", \"p4\": \""+strCertEmail+"\", \"p5\": \""+strCertIssuerDN+"\", \"p6\": "+lInfoType+"}";	              		
           		return _Getretmsg(GetCertListCmd);
           },
           GetCertLists: function (strCertType, strCertDN, strCertSN, strCertEmail, strCertIssuerDN, lInfoType){ 
           	  var GetCertListsCmd = "{\"name\": \"GetCertLists\", \"p1\": \""+strCertType+"\", \"p2\": \""+strCertDN+"\", \"p3\": \""+strCertSN+"\", \"p4\": \""+strCertEmail+"\", \"p5\": \""+strCertIssuerDN+"\", \"p6\": "+lInfoType+"}";	              		
           		return _Getretmsg(GetCertListsCmd);
           },
           SetCertByBase64: function (strBase64){ 
           	  var SetCertByBase64Cmd = "{\"name\": \"SetCertByBase64\", \"p1\": \""+strBase64+"\"}";	              		
           		return _Getretcode(SetCertByBase64Cmd);
           }, 
           SetCertByBase64Ex: function (strBase64){ 
           	  var SetCertByBase64ExCmd = "{\"name\": \"SetCertByBase64Ex\", \"p1\": \""+strBase64+"\"}";	              		
           		return _Getretcode(SetCertByBase64ExCmd);
           }, 
           ChangeCertDN: function (strCertDN, lChangeFlag){ 
           	  var ChangeCertDNCmd = "{\"name\": \"ChangeCertDN\", \"p1\": \""+strCertDN+"\", \"p2\": "+lChangeFlag+"}";	              		
           		return _Getretmsg(ChangeCertDNCmd);
           },          
           GetVersion: function (){               		
           		return _Getretmsg(GetVersionCmd);
           },
           GetMac: function (){               		
           		return _Getretmsg(GetMacCmd);
           },
           ReStartServer: function (){                   
              return _Getretmsg(ReStartServerCmd);
           },
           GetData: function (){               		
           		return _Getretmsg(GetDataCmd);
           },
           CheckCertIsExist: function(strCertSN){ 
           	  var CheckCertIsExistCmd = "{\"name\": \"CheckCertIsExist\", \"p1\": \""+strCertSN+"\"}";             		
           		return _Getretvalue(CheckCertIsExistCmd);
           },            
           
           AttachSignStr_Batch: function (types,strCertType,strDN,strSN,strEmail,strDNIssuer,strCertBase64,strpincode, strdn,strsrc) {	           	  
							var AttachSignStr_BatchCmd ={name:"BatchCmd",
       	                                  Items:[{name:"SetCertChooseType",p1:types},
													           	                {name:"SetCert",p1:strCertType, p2:strDN, p3:strSN, p4:strEmail, p5:strDNIssuer, p6:strCertBase64},
													           	                {name:"AttachSignStr",p1:strdn, p2:strsrc}]};		
				var AttachSignStr_BatchCmdJson = JSON.stringify(AttachSignStr_BatchCmd);//转换为json字符串																						
           		return _Getretvalue(AttachSignStr_BatchCmdJson);
           },   
           
           AttachSignEx_Batch: function (types,strCertType,strDN,strSN,strEmail,strDNIssuer,strCertBase64,fileNameUseUTF8,strdn,strFileName,strFileNameOut) {                
              var AttachSignEx_BatchCmd ={name:"BatchCmd",
                                          Items:[{name:"SetCertChooseType",p1:types},
                                                      {name:"SetCert",p1:strCertType, p2:strDN, p3:strSN, p4:strEmail, p5:strDNIssuer, p6:strCertBase64},
                                                      {name:"SetFileNameUseUTF8",p1:fileNameUseUTF8},
                                                      {name:"AttachSignEx",p1:strdn, p2:strFileName, p3:strFileNameOut }]}; 
				var AttachSignEx_BatchCmdJson = JSON.stringify(AttachSignEx_BatchCmd);//转换为json字符串														  
              return _Getretvalue(AttachSignEx_BatchCmdJson);
           },
           
           VerifyAttachedSign_Batch: function (strSignedData) {	           	  
           	  var VerifyAttachedSign_BatchCmd ="{\"name\": \"BatchCmd\", "+
       	                                       "\"Items\": [{\"name\": \"VerifyAttachedSign\", \"p1\": \""+strSignedData+"\"}]}";	
           		return _Getretvalue(VerifyAttachedSign_BatchCmd);
           },   
          //-------------------------------------------Org Batch Begin--------------------------------------------
          //detach sign
          DetachSignStr_Batch: function (types,strCertType,strDN,strSN,strEmail,strDNIssuer,strCertBase64,strpincode, strdn,strsrc) {               
              var DetachSignStr_BatchCmd ="{\"name\": \"BatchCmd\", "+
                                          "\"Items\": ["+
                                                      "{\"name\": \"SetCertChooseType\", \"p1\": "+types+"},"+
                                                      "{\"name\": \"SetCert\", \"p1\": \""+strCertType+"\", \"p2\": \""+strDN+"\", \"p3\": \""+strSN+"\", \"p4\": \""+strEmail+"\", \"p5\": \""+strDNIssuer+"\", \"p6\": \""+strCertBase64+"\"},"+
                                                      "{\"name\": \"DetachSignStr\", \"p1\": \""+strdn+"\", \"p2\": \""+strsrc+"\"}]}";                                                     
              return _Getretvalue(DetachSignStr_BatchCmd);
          }, 
           //detach Vsign  
           VertifyDetachSign_Batch: function (strSignedData,strsrc) {               
              var VertifyDetachSign_BatchCmd ="{\"name\": \"BatchCmd\", "+
                                          "\"Items\": ["+
                                                      "{\"name\": \"VerifyDetachedSignStr\", \"p1\": \""+strSignedData+"\", \"p2\": \""+strsrc+"\"}]}";                                                     
              return _Getretvalue(VertifyDetachSign_BatchCmd);
           }, 
            //envelop
           EncryptEnvelopStr_Batch:function(types,strCertType,strDN,strSN,strEmail,strDNIssuer,strCertBase64,strdn,strsrc){
              var EncryptEnvelopStr_BatchCmd ="{\"name\": \"BatchCmd\", "+
                                          "\"Items\": ["+
                                                      "{\"name\": \"SetCertChooseType\", \"p1\": "+types+"},"+
                                                      "{\"name\": \"SetCert\", \"p1\": \""+strCertType+"\", \"p2\": \""+strDN+"\", \"p3\": \""+strSN+"\", \"p4\": \""+strEmail+"\", \"p5\": \""+strDNIssuer+"\", \"p6\": \""+strCertBase64+"\"},"+
                                                      "{\"name\": \"EncryptEnvelopStr\", \"p1\": \""+strdn+"\", \"p2\": \""+strsrc+"\"}]}";                                                     
              return _Getretvalue(EncryptEnvelopStr_BatchCmd);
           },
           //envelop(dsCert) 
           EncryptEnvelopCertStr_Batch:function(types,strBase64,strdn,strsrc){
              var EncryptEnvelopCertStr_BatchCmd ="{\"name\": \"BatchCmd\", "+
                                          "\"Items\": ["+
                                                      "{\"name\": \"SetCertChooseType\", \"p1\": "+types+"},"+
                                                      "{\"name\": \"SetCertByBase64\", \"p1\": \""+strBase64+"\"},"+
                                                      "{\"name\": \"EncryptEnvelopStr\", \"p1\": \""+strdn+"\", \"p2\": \""+strsrc+"\"}]}";                                                     
              return _Getretvalue(EncryptEnvelopCertStr_BatchCmd);
           },
           //decryptEnvelop
           DecryptEnvelopStr_Batch:function(strEnvelop){
              var DecryptEnvelopStr_BatchCmd ="{\"name\": \"BatchCmd\", "+
                                          "\"Items\": ["+
                                                      "{\"name\": \"DecryptEnvelop\", \"p1\": \""+strEnvelop+"\"}]}";                                                     
              return _Getretvalue(DecryptEnvelopStr_BatchCmd);
           },
           //hashDigest
           HashDigest_Batch: function (strSrcData) {
              var HashDigest_BatchCmd = "{\"name\": \"BatchCmd\", "+
                             "\"Items\": ["+
                                         "{\"name\": \"Digest\", \"p1\": \""+strSrcData+"\"}]}";
              return _Getretmsg(HashDigest_BatchCmd);
           },
           VerifyPinCode_Batch: function(types,strCertType,strDN,strSN,strEmail,strDNIssuer,strCertBase64,strPinCode, strNewPinCode) {
              var VerifyPinCode_BatchCmd = "{\"name\": \"BatchCmd\", "+
                             "\"Items\": ["+
                                         "{\"name\": \"SetCertChooseType\", \"p1\": "+types+"},"+
                                         "{\"name\": \"SetCert\", \"p1\": \""+strCertType+"\", \"p2\": \""+strDN+"\", \"p3\": \""+strSN+"\", \"p4\": \""+strEmail+"\", \"p5\": \""+strDNIssuer+"\", \"p6\": \""+strCertBase64+"\"},"+
                                         "{\"name\": \"VerifyPinCode\", \"p1\": \""+strPinCode+"\", \"p2\": \""+strNewPinCode+"\"}]}";
              return _Getretcode(VerifyPinCode_BatchCmd);
           }, 
           MOF_DetachSignStr_Batch: function (moftypes,types,strCertType,strDN,strSN,strEmail,strDNIssuer,strCertBase64,strdn,iscert,strsrc,strserverinfo) {
              var MOFDetachSignStr_BatchCmd = "{\"name\": \"BatchCmd\", "+
                              "\"Items\": ["+
                                          "{\"name\": \"MOF_SetFlag\", \"p1\": "+moftypes+"},"+
                                          "{\"name\": \"SetCertChooseType\", \"p1\": "+types+"},"+
                                          "{\"name\": \"SetCert\", \"p1\": \""+strCertType+"\", \"p2\": \""+strDN+"\", \"p3\": \""+strSN+"\", \"p4\": \""+strEmail+"\", \"p5\": \""+strDNIssuer+"\", \"p6\": \""+strCertBase64+"\"},"+
                                          "{\"name\": \"MOF_DetachSignStr\", \"p1\": \""+strdn+"\", \"p2\": "+iscert+", \"p3\": \""+strsrc+"\", \"p4\": \""+strserverinfo+"\"}]}";
              return _Getretvalue(MOFDetachSignStr_BatchCmd);
           },
           MOF_VerifyDetachedSignStr_Batch: function (moftypes,strSignedData,strsrc) {
              var MOFVerifyDetachedSignStr_BatchCmd = "{\"name\": \"BatchCmd\", "+
                              "\"Items\": ["+
                                          "{\"name\": \"MOF_SetFlag\", \"p1\": "+moftypes+"},"+
                                          "{\"name\": \"MOF_VerifyDetachedSignStr\", \"p1\": \""+strSignedData+"\", \"p2\": \""+strsrc+"\"}]}";
              return _Getretvalue(MOFVerifyDetachedSignStr_BatchCmd);
           },
           MOF_EncryptEnvelopStr_Batch: function (moftypes,types,strCertType,strDN,strSN,strEmail,strDNIssuer,strCertBase64,strdn,strsrc,strserverinfo) {
              var MOFEncryptEnvelopStr_BatchCmd = "{\"name\": \"BatchCmd\", "+
                              "\"Items\": ["+
                                          "{\"name\": \"MOF_SetFlag\", \"p1\": "+moftypes+"},"+
                                          "{\"name\": \"SetCertChooseType\", \"p1\": "+types+"},"+
                                          "{\"name\": \"SetCert\", \"p1\": \""+strCertType+"\", \"p2\": \""+strDN+"\", \"p3\": \""+strSN+"\", \"p4\": \""+strEmail+"\", \"p5\": \""+strDNIssuer+"\", \"p6\": \""+strCertBase64+"\"},"+
                                          "{\"name\": \"MOF_EncryptEnvelopStr\", \"p1\": \""+strdn+"\", \"p2\": \""+strsrc+"\", \"p3\": \""+strserverinfo+"\"}]}";
              return _Getretvalue(MOFEncryptEnvelopStr_BatchCmd);
           },
           MOF_DecryptEnvelopStr_Batch: function (moftypes,strEnvelop) {
              var MOFDecryptEnvelopStr_BatchCmd = "{\"name\": \"BatchCmd\", "+
                              "\"Items\": ["+
                                          "{\"name\": \"MOF_SetFlag\", \"p1\": "+moftypes+"},"+
                                          "{\"name\": \"MOF_DecryptEnvelop\", \"p1\": \""+strEnvelop+"\"}]}";
              return _Getretvalue(MOFDecryptEnvelopStr_BatchCmd);
           },  
           MOF_EncryptEnvelopMultiCertStr2_Batch:function(moftypes,strBase64_1,strBase64_2,types,strdn,strsrc,strserverinfo){
              var MOFEncryptEnvelopMultiCertStr2_BatchCmd = "{\"name\": \"BatchCmd\", "+
                              "\"Items\": ["+
                                          "{\"name\": \"MOF_SetFlag\", \"p1\": "+moftypes+"},"+
                                          "{\"name\": \"SetCertByBase64Ex\", \"p1\": \""+strBase64_1+"\"},"+
                                          "{\"name\": \"SetCertByBase64Ex\", \"p1\": \""+strBase64_2+"\"},"+
                                          "{\"name\": \"SetCertChooseType\", \"p1\": "+types+"},"+
                                          "{\"name\": \"MOF_EncryptEnvelopStr\", \"p1\": \""+strdn+"\", \"p2\": \""+strsrc+"\", \"p3\": \""+strserverinfo+"\"}]}";
              return _Getretvalue(MOFEncryptEnvelopMultiCertStr2_BatchCmd);
           },
           MOF_EncryptEnvelopMultiCertStr1_Batch:function(moftypes,strBase64,types,strdn,strsrc,strserverinfo){
              var MOFEncryptEnvelopMultiCertStr1_BatchCmd = "{\"name\": \"BatchCmd\", "+
                              "\"Items\": ["+
                                          "{\"name\": \"MOF_SetFlag\", \"p1\": "+moftypes+"},"+
                                          "{\"name\": \"SetCertByBase64Ex\", \"p1\": \""+strBase64+"\"},"+
                                          "{\"name\": \"SetCertChooseType\", \"p1\": "+types+"},"+
                                          "{\"name\": \"MOF_EncryptEnvelopStr\", \"p1\": \""+strdn+"\", \"p2\": \""+strsrc+"\", \"p3\": \""+strserverinfo+"\"}]}";
              return _Getretvalue(MOFEncryptEnvelopMultiCertStr1_BatchCmd);
           },
           P1SignStr_Batch: function (types,strCertType,strDN,strSN,strEmail,strDNIssuer,strCertBase64,strdn,strsrc) {
              var P1SignStr_BatchCmd = "{\"name\": \"BatchCmd\", "+
                              "\"Items\": ["+
                                          "{\"name\": \"SetCertChooseType\", \"p1\": "+types+"},"+
                                          "{\"name\": \"SetCert\", \"p1\": \""+strCertType+"\", \"p2\": \""+strDN+"\", \"p3\": \""+strSN+"\", \"p4\": \""+strEmail+"\", \"p5\": \""+strDNIssuer+"\", \"p6\": \""+strCertBase64+"\"},"+
                                          "{\"name\": \"P1SignStr\", \"p1\": \""+strdn+"\", \"p2\": \""+strsrc+"\"}]}";
              return _Getretvalue(P1SignStr_BatchCmd);
           },
            CreateSignedEnvelopStr_Batch: function (types,
            SCstrCertType,SCstrDN,SCstrSN,SCstrEmail,SCstrDNIssuer,SCstrCertBase64,
            ECstrCertType,ECstrDN,ECstrSN,ECstrEmail,ECstrDNIssuer,ECstrCertBase64,
            strSignCertDN, strEncCertDN, strSrc) {
              var CreateSignedEnvelopStr_BatchCmd = "{\"name\": \"BatchCmd\", "+
                              "\"Items\": ["+
                                          "{\"name\": \"SetCertChooseType\", \"p1\": "+types+"},"+
                                          "{\"name\": \"SetCert\", \"p1\": \""+SCstrCertType+"\", \"p2\": \""+SCstrDN+"\", \"p3\": \""+SCstrSN+"\", \"p4\": \""+SCstrEmail+"\", \"p5\": \""+SCstrDNIssuer+"\", \"p6\": \""+SCstrCertBase64+"\"},"+
                                          "{\"name\": \"SetCert\", \"p1\": \""+ECstrCertType+"\", \"p2\": \""+ECstrDN+"\", \"p3\": \""+ECstrSN+"\", \"p4\": \""+ECstrEmail+"\", \"p5\": \""+ECstrDNIssuer+"\", \"p6\": \""+ECstrCertBase64+"\"},"+
                                          "{\"name\": \"CreateSignedEnvelopStr\", \"p1\": \""+strSignCertDN+"\", \"p2\": \""+strEncCertDN+"\", \"p3\": \""+strSrc+"\"}]}";
              return _Getretmsg(CreateSignedEnvelopStr_BatchCmd);
           },
           CreateSignedEnvelopCertStr_Batch: function (types,
            SCstrCertType,SCstrDN,SCstrSN,SCstrEmail,SCstrDNIssuer,SCstrCertBase64,
            strBase64,strSignCertDN, strEncCertDN, strSrc) {
              var CreateSignedEnvelopCertStr_BatchCmd = "{\"name\": \"BatchCmd\", "+
                              "\"Items\": ["+
                                          "{\"name\": \"SetCertChooseType\", \"p1\": "+types+"},"+
                                          "{\"name\": \"SetCert\", \"p1\": \""+SCstrCertType+"\", \"p2\": \""+SCstrDN+"\", \"p3\": \""+SCstrSN+"\", \"p4\": \""+SCstrEmail+"\", \"p5\": \""+SCstrDNIssuer+"\", \"p6\": \""+SCstrCertBase64+"\"},"+
                                          "{\"name\": \"SetCertByBase64\", \"p1\": \""+strBase64+"\"},"+
                                          "{\"name\": \"CreateSignedEnvelopStr\", \"p1\": \""+strSignCertDN+"\", \"p2\": \""+strEncCertDN+"\", \"p3\": \""+strSrc+"\"}]}";
              return _Getretmsg(CreateSignedEnvelopCertStr_BatchCmd);
           },
           SymmetricEncrypt_Batch: function (strHashAlg, strEncAlg, strSymmetricKey, strSrcData, isPad){ 
              var SymmetricEncrypt_BatchCmd = "{\"name\": \"BatchCmd\", "+
                              "\"Items\": ["+
                                          "{\"name\": \"SetAlgorithm\", \"p1\": \""+strHashAlg+"\", \"p2\": \""+strEncAlg+"\"},"+
                                          "{\"name\": \"SymmetricEncrypt\", \"p1\": \""+strSymmetricKey+"\", \"p2\": \""+strSrcData+"\", \"p3\": "+isPad+"}]}";     
              return _Getretmsg(SymmetricEncrypt_BatchCmd);
           },
           SymmetricDecrypt_Batch: function (strHashAlg, strEncAlg, strSymmetricKey, strEncryptData, isPad){ 
              var SymmetricDecrypt_BatchCmd = "{\"name\": \"BatchCmd\", "+
                              "\"Items\": ["+
                                          "{\"name\": \"SetAlgorithm\", \"p1\": \""+strHashAlg+"\", \"p2\": \""+strEncAlg+"\"},"+
                                          "{\"name\": \"SymmetricDecrypt\", \"p1\": \""+strSymmetricKey+"\", \"p2\": \""+strEncryptData+"\", \"p3\": "+isPad+"}]}";                   
              return _Getretmsg(SymmetricDecrypt_BatchCmd);
           },
            SetCertEx_Batch: function (types, strCertStoreType, strCertType,strDN,strSN,strEmail,strDNIssuer,strCertBase64){
              var SetCertEx_BatchCmd = "{\"name\": \"BatchCmd\", "+
                              "\"Items\": ["+
                                          "{\"name\": \"SetCertChooseType\", \"p1\": "+types+"},"+
                                          "{\"name\": \"SetCertEx\", \"p1\": \""+strCertStoreType+"\", \"p2\": \""+strCertType+"\", \"p3\": \""+strDN+"\", \"p4\": \""+strSN+"\", \"p5\": \""+strEmail+"\", \"p6\": \""+strDNIssuer+"\", \"p7\": \""+strCertBase64+"\"}]}";
              return _Getretmsg(SetCertEx_BatchCmd); 
           },
           SetCert2_Batch: function (types, strCertType,strDN,strSN,strEmail,strDNIssuer,strCertBase64,strCertNameType){
              var SetCert2_BatchCmd = "{\"name\": \"BatchCmd\", "+
                              "\"Items\": ["+
                                          "{\"name\": \"SetCertChooseType\", \"p1\": "+types+"},"+
                                          "{\"name\": \"SetCert2\", \"p1\": \""+strCertType+"\", \"p2\": \""+strDN+"\", \"p3\": \""+strSN+"\", \"p4\": \""+strEmail+"\", \"p5\": \""+strDNIssuer+"\", \"p6\": \""+strCertBase64+"\", \"p7\": \""+strCertNameType+"\"}]}";
              return _Getretcode(SetCert2_BatchCmd);  
           },
           GetCertLists_Batch: function (strCertType, strCertDN, strCertSN, strCertEmail, strCertIssuerDN, lInfoType){ 
              var GetCertLists_BatchCmd = "{\"name\": \"BatchCmd\", "+
                              "\"Items\": ["+
                                          "{\"name\": \"GetCertLists\", \"p1\": \""+strCertType+"\", \"p2\": \""+strCertDN+"\", \"p3\": \""+strCertSN+"\", \"p4\": \""+strCertEmail+"\", \"p5\": \""+strCertIssuerDN+"\", \"p6\": "+lInfoType+"}]}";                    
              return _Getretmsg(GetCertLists_BatchCmd);
           },
           //-------------------------------------------Org Batch End----------------------------------------------
           /******file batch start*****/
           //Attach Sign File
           AttachSignEx_file_Batch: function (strinitParam,types,strCertType,strDN,strSN,strEmail,strDNIssuer,strCertBase64,fileNameUseUTF8,strdn,strFileName,strFileNameOut) {  
              var strFileName = strFileName.replace(/\\/g,'\\\\');   
              var strFileNameOut = strFileNameOut.replace(/\\/g,'\\\\');                
              var AttachSignEx_BatchCmd ="{\"name\": \"BatchCmd\", "+
                                          "\"Items\": [{\"name\": \"RegisterParam\", \"p1\": \""+strinitParam+"\"},"+
                                                      "{\"name\": \"SetCertChooseType\", \"p1\": "+types+"},"+
                                                      "{\"name\": \"SetCert\", \"p1\": \""+strCertType+"\", \"p2\": \""+strDN+"\", \"p3\": \""+strSN+"\", \"p4\": \""+strEmail+"\", \"p5\": \""+strDNIssuer+"\", \"p6\": \""+strCertBase64+"\"},"+
                                                      "{\"name\": \"SetFileNameUseUTF8\", \"p1\": "+fileNameUseUTF8+"},"+
                                                      "{\"name\": \"AttachSignEx\", \"p1\": \""+strdn+"\", \"p2\": \""+strFileName+"\",\"p3\": \""+ strFileNameOut +"\"}]}";                                                     
              return _Getretvalue(AttachSignEx_BatchCmd);
           },


         

          //Attach Sign Big File
          JITAttachFromFile_file_BigData_Batch: function (strinitParam,types,strCertType,strDN,strSN,strEmail,strDNIssuer,strCertBase64,fileNameUseUTF8,strdn,strFileName,strFileNameOut) {  
          //    var strFileName = strFileName.replace(/\\/g,'\\\\');   
          //    var strFileNameOut = strFileNameOut.replace(/\\/g,'\\\\');                
              var JITAttachFromFile_BigData_BatchCmd ={name:"BatchCmd",
                                          Items:[{name:"RegisterParam",p1:strinitParam},
                                                      {name:"SetCertChooseType",p1:types},
                                                      {name:"SetCert",p1:strCertType, p2:strDN, p3:strSN, p4:strEmail, p5:strDNIssuer, p6:strCertBase64},
                                                      {name:"SetFileNameUseUTF8",p1:fileNameUseUTF8},
                                                      {name:"JITAttachFromFile_BigData",p1:strdn, p2:strFileName, p3:strFileNameOut }]};  
				var JITAttachFromFile_BigData_BatchCmdJson = JSON.stringify(JITAttachFromFile_BigData_BatchCmd);//转换为json字符串
              return _Getretvalue(JITAttachFromFile_BigData_BatchCmdJson);
           },

            //Detach Sign File
            DetachSignEx_file_Batch: function (strinitParam,types,strCertType,strDN,strSN,strEmail,strDNIssuer,strCertBase64,fileNameUseUTF8,strdn,strFileName,strFileNameOut) {    
              var strFileName = strFileName.replace(/\\/g,'\\\\');   
              var strFileNameOut = strFileNameOut.replace(/\\/g,'\\\\');             
              var DetachSignEx_BatchCmd ="{\"name\": \"BatchCmd\", "+
                                          "\"Items\": [{\"name\": \"RegisterParam\", \"p1\": \""+strinitParam+"\"},"+
                                                      "{\"name\": \"SetCertChooseType\", \"p1\": "+types+"},"+
                                                      "{\"name\": \"SetCert\", \"p1\": \""+strCertType+"\", \"p2\": \""+strDN+"\", \"p3\": \""+strSN+"\", \"p4\": \""+strEmail+"\", \"p5\": \""+strDNIssuer+"\", \"p6\": \""+strCertBase64+"\"},"+
                                                      "{\"name\": \"SetFileNameUseUTF8\", \"p1\": "+fileNameUseUTF8+"},"+
                                                      "{\"name\": \"DetachSignEx\", \"p1\": \""+strdn+"\", \"p2\": \""+strFileName+"\",\"p3\": \""+ strFileNameOut +"\"}]}";                                                     
              return _Getretvalue(DetachSignEx_BatchCmd);
           },

              //Detach Sign File val
            JITDetachFromFile_BigData_Val_file_Batch: function (strinitParam,types,strCertType,strDN,strSN,strEmail,strDNIssuer,strCertBase64,fileNameUseUTF8,strdn,strFileName,strFileNameOut) {    
              var strFileName = strFileName.replace(/\\/g,'\\\\');   
              var strFileNameOut = strFileNameOut.replace(/\\/g,'\\\\');             
              var JITDetachFromFile_BigData_Val_BatchCmd ="{\"name\": \"BatchCmd\", "+
                                          "\"Items\": [{\"name\": \"RegisterParam\", \"p1\": \""+strinitParam+"\"},"+
                                                      "{\"name\": \"SetCertChooseType\", \"p1\": "+types+"},"+
                                                      "{\"name\": \"SetCert\", \"p1\": \""+strCertType+"\", \"p2\": \""+strDN+"\", \"p3\": \""+strSN+"\", \"p4\": \""+strEmail+"\", \"p5\": \""+strDNIssuer+"\", \"p6\": \""+strCertBase64+"\"},"+
                                                      "{\"name\": \"SetFileNameUseUTF8\", \"p1\": "+fileNameUseUTF8+"},"+
                                                      "{\"name\": \"JITDetachFromFile_BigData_Val\", \"p1\": \""+strdn+"\", \"p2\": \""+strFileName+"\",\"p3\": \""+ strFileNameOut +"\"}]}";                                                     
              return _Getretvalue(JITDetachFromFile_BigData_Val_BatchCmd);
           },

          //Detach Sign Big File
          JITDetachFromFile_BigData_file_Batch: function (strinitParam,types,strCertType,strDN,strSN,strEmail,strDNIssuer,strCertBase64,fileNameUseUTF8,strdn,strFileName,strFileNameOut) {  
              var strFileName = strFileName.replace(/\\/g,'\\\\');   
              var strFileNameOut = strFileNameOut.replace(/\\/g,'\\\\');                
              var JITDetachFromFile_BigData_BatchCmd ="{\"name\": \"BatchCmd\", "+
                                          "\"Items\": [{\"name\": \"RegisterParam\", \"p1\": \""+strinitParam+"\"},"+
                                                      "{\"name\": \"SetCertChooseType\", \"p1\": "+types+"},"+
                                                      "{\"name\": \"SetCert\", \"p1\": \""+strCertType+"\", \"p2\": \""+strDN+"\", \"p3\": \""+strSN+"\", \"p4\": \""+strEmail+"\", \"p5\": \""+strDNIssuer+"\", \"p6\": \""+strCertBase64+"\"},"+
                                                      "{\"name\": \"SetFileNameUseUTF8\", \"p1\": "+fileNameUseUTF8+"},"+
                                                      "{\"name\": \"JITDetachFromFile_BigData\", \"p1\": \""+strdn+"\", \"p2\": \""+strFileName+"\",\"p3\": \""+ strFileNameOut +"\"}]}";                                                     
              return _Getretvalue(JITDetachFromFile_BigData_BatchCmd);
           },

           //Verify Attach Sign File
            VerifyAttachedSignEx_file_Batch: function (strinitParam,fileNameUseUTF8,resultFileName,dSignSavefile) { 
              var resultFileName = resultFileName.replace(/\\/g,'\\\\');   
              var dSignSavefile = dSignSavefile.replace(/\\/g,'\\\\');                 
              var VerifyAttachedSignEx_BatchCmd ="{\"name\": \"BatchCmd\", "+
                                          "\"Items\": [{\"name\": \"RegisterParam\", \"p1\": \""+strinitParam+"\"},"+
                                                      "{\"name\": \"SetFileNameUseUTF8\", \"p1\": "+fileNameUseUTF8+"},"+
                                                      "{\"name\": \"VerifyAttachedSignEx\", \"p1\": \""+resultFileName+"\"},"+
                                                      "{\"name\": \"GetFile\", \"p1\": \""+dSignSavefile+"\"}]}";                                                
              return _Getretvalue(VerifyAttachedSignEx_BatchCmd);
           },

             //Verify Attach Sign 
            VerifyAttachedSign_file_Batch: function (strinitParam,fileNameUseUTF8,strSignedData,dSignSavefile) { 
              var dSignSavefile = dSignSavefile.replace(/\\/g,'\\\\');                    
              var VerifyAttachedSign_BatchCmd ="{\"name\": \"BatchCmd\", "+
                                               "\"Items\": [{\"name\": \"RegisterParam\", \"p1\": \""+strinitParam+"\"},"+
                                                      "{\"name\": \"SetFileNameUseUTF8\", \"p1\": "+fileNameUseUTF8+"},"+
                                                      "{\"name\": \"VerifyAttachedSign\", \"p1\": \""+strSignedData+"\"},"+
                                                      "{\"name\": \"GetFile\", \"p1\": \""+dSignSavefile+"\"}]}"; 
              return _Getretvalue(VerifyAttachedSign_BatchCmd);
           },  

            //Verify Attach Sign Big File
            JITVerifyAttachFromFile_BigData_file_Batch: function (strinitParam,fileNameUseUTF8,resultFileName,dSignSavefile) { 
              var resultFileName = resultFileName.replace(/\\/g,'\\\\');   
              var dSignSavefile = dSignSavefile.replace(/\\/g,'\\\\');                    
              var JITVerifyAttachFromFile_BigData_BatchCmd ="{\"name\": \"BatchCmd\", "+
                                          "\"Items\": [{\"name\": \"RegisterParam\", \"p1\": \""+strinitParam+"\"},"+
                                                      "{\"name\": \"SetFileNameUseUTF8\", \"p1\": "+fileNameUseUTF8+"},"+
                                                      "{\"name\": \"JITVerifyAttachFromFile_BigData\", \"p1\": \""+resultFileName+"\", \"p2\": \""+dSignSavefile+"\"}]}";                                                
              return _Getretvalue(JITVerifyAttachFromFile_BigData_BatchCmd);
           },

           //Verify Detach Sign File
            VerifyDetachedSignEx_file_Batch: function (strinitParam,fileNameUseUTF8,strSignedResultData,resultFileName,dSignSourceFile) { 
              var resultFileName = resultFileName.replace(/\\/g,'\\\\');  
              var dSignSourceFile = dSignSourceFile.replace(/\\/g,'\\\\');            
              var VerifyDetachedSignEx_BatchCmd ="{\"name\": \"BatchCmd\", "+
                                          "\"Items\": [{\"name\": \"RegisterParam\", \"p1\": \""+strinitParam+"\"},"+
                                                      "{\"name\": \"SetFileNameUseUTF8\", \"p1\": "+fileNameUseUTF8+"},"+
                                                      "{\"name\": \"VerifyDetachedSignEx\", \"p1\": \""+strSignedResultData+"\",\"p2\": \""+resultFileName+"\", \"p3\": \""+dSignSourceFile+"\"}]}";                                               
              return _Getretvalue(VerifyDetachedSignEx_BatchCmd);
           },


            //Verify Detach Sign Big File
            JITVerifyDetachFromFile_BigData_file_Batch: function (strinitParam,fileNameUseUTF8,resultFileName,dSignSavefile) { 
              var resultFileName = resultFileName.replace(/\\/g,'\\\\');   
              var dSignSavefile = dSignSavefile.replace(/\\/g,'\\\\');                    
              var JITVerifyDetachFromFile_BigData_BatchCmd ="{\"name\": \"BatchCmd\", "+
                                          "\"Items\": [{\"name\": \"RegisterParam\", \"p1\": \""+strinitParam+"\"},"+
                                                      "{\"name\": \"SetFileNameUseUTF8\", \"p1\": "+fileNameUseUTF8+"},"+
                                                      "{\"name\": \"JITVerifyDetachFromFile_BigData\", \"p1\": \""+resultFileName+"\", \"p2\": \""+dSignSavefile+"\"}]}";                                                
              return _Getretvalue(JITVerifyDetachFromFile_BigData_BatchCmd);
           },

           //EncryptEnvelopEx File
            EncryptEnvelopEx_file_Batch: function (strinitParam,types,strCertType,strDN,strSN,strEmail,strDNIssuer,strCertBase64,fileNameUseUTF8,strdn,strFileName,strFileNameOut) {    
              var strFileName = strFileName.replace(/\\/g,'\\\\');   
              var strFileNameOut = strFileNameOut.replace(/\\/g,'\\\\');             
              var EncryptEnvelopEx_BatchCmd ="{\"name\": \"BatchCmd\", "+
                                          "\"Items\": [{\"name\": \"RegisterParam\", \"p1\": \""+strinitParam+"\"},"+
                                                      "{\"name\": \"SetCertChooseType\", \"p1\": "+types+"},"+
                                                      "{\"name\": \"SetCert\", \"p1\": \""+strCertType+"\", \"p2\": \""+strDN+"\", \"p3\": \""+strSN+"\", \"p4\": \""+strEmail+"\", \"p5\": \""+strDNIssuer+"\", \"p6\": \""+strCertBase64+"\"},"+
                                                      "{\"name\": \"SetFileNameUseUTF8\", \"p1\": "+fileNameUseUTF8+"},"+
                                                      "{\"name\": \"EncryptEnvelopEx\", \"p1\": \""+strdn+"\", \"p2\": \""+strFileName+"\",\"p3\": \""+ strFileNameOut +"\"}]}";                                                     
              return _Getretvalue(EncryptEnvelopEx_BatchCmd);
           },


          //Envelope Big File
          JITCreateEnvelopeFromFile_BigData_file_Batch: function (strinitParam,types,strCertType,strDN,strSN,strEmail,strDNIssuer,strCertBase64,fileNameUseUTF8,strdn,strFileName,strFileNameOut) {  
              var strFileName = strFileName.replace(/\\/g,'\\\\');   
              var strFileNameOut = strFileNameOut.replace(/\\/g,'\\\\');                
              var JITCreateEnvelopeFromFile_BigData_BatchCmd ="{\"name\": \"BatchCmd\", "+
                                          "\"Items\": [{\"name\": \"RegisterParam\", \"p1\": \""+strinitParam+"\"},"+
                                                      "{\"name\": \"SetCertChooseType\", \"p1\": "+types+"},"+
                                                      "{\"name\": \"SetCert\", \"p1\": \""+strCertType+"\", \"p2\": \""+strDN+"\", \"p3\": \""+strSN+"\", \"p4\": \""+strEmail+"\", \"p5\": \""+strDNIssuer+"\", \"p6\": \""+strCertBase64+"\"},"+
                                                      "{\"name\": \"SetFileNameUseUTF8\", \"p1\": "+fileNameUseUTF8+"},"+
                                                      "{\"name\": \"JITCreateEnvelopeFromFile_BigData\", \"p1\": \""+strdn+"\", \"p2\": \""+strFileName+"\",\"p3\": \""+ strFileNameOut +"\"}]}";                                                     
              return _Getretvalue(JITCreateEnvelopeFromFile_BigData_BatchCmd);
           },

             //Decrypt Envelop content
            DecryptEnvelop_file_Batch: function (strinitParam,fileNameUseUTF8,strEnvelopData,dSignSavefile) { 
              var dSignSavefile = dSignSavefile.replace(/\\/g,'\\\\');                    
              var DecryptEnvelop_BatchCmd ="{\"name\": \"BatchCmd\", "+
                                               "\"Items\": [{\"name\": \"RegisterParam\", \"p1\": \""+strinitParam+"\"},"+
                                                      "{\"name\": \"SetFileNameUseUTF8\", \"p1\": "+fileNameUseUTF8+"},"+
                                                      "{\"name\": \"DecryptEnvelop\", \"p1\": \""+strEnvelopData+"\"},"+
                                                      "{\"name\": \"GetFile\", \"p1\": \""+dSignSavefile+"\"}]}"; 
              return _Getretvalue(DecryptEnvelop_BatchCmd);
           },  


            //Decrypt Envelop File
            DecryptEnvelopEx_file_Batch: function (strinitParam,fileNameUseUTF8,resultFileName,dSignSavefile) { 
              var resultFileName = resultFileName.replace(/\\/g,'\\\\');   
              var dSignSavefile = dSignSavefile.replace(/\\/g,'\\\\');                 
              var DecryptEnvelopEx_BatchCmd ="{\"name\": \"BatchCmd\", "+
                                          "\"Items\": [{\"name\": \"RegisterParam\", \"p1\": \""+strinitParam+"\"},"+
                                                      "{\"name\": \"SetFileNameUseUTF8\", \"p1\": "+fileNameUseUTF8+"},"+
                                                      "{\"name\": \"DecryptEnvelopEx\", \"p1\": \""+resultFileName+"\"},"+
                                                      "{\"name\": \"GetFile\", \"p1\": \""+dSignSavefile+"\"}]}";                                                
              return _Getretvalue(DecryptEnvelopEx_BatchCmd);
           },

            //Decrypt Envelop Big File
            JITDecryptEnvelopeFromFile_BigData_file_Batch: function (strinitParam,fileNameUseUTF8,strEnvelopData,dEnvelopSavefile) { 
              var strEnvelopData = strEnvelopData.replace(/\\/g,'\\\\');   
              var dEnvelopSavefile = dEnvelopSavefile.replace(/\\/g,'\\\\');                   
              var JITDecryptEnvelopeFromFile_BigData_BatchCmd ="{\"name\": \"BatchCmd\", "+
                                               "\"Items\": [{\"name\": \"RegisterParam\", \"p1\": \""+strinitParam+"\"},"+
                                                      "{\"name\": \"SetFileNameUseUTF8\", \"p1\": "+fileNameUseUTF8+"},"+
                                                      "{\"name\": \"JITDecryptEnvelopeFromFile_BigData\", \"p1\": \""+strEnvelopData+"\", \"p2\": \""+dEnvelopSavefile+"\"}]}"; 
              return _Getretvalue(JITDecryptEnvelopeFromFile_BigData_BatchCmd);
           },  

           //Digest File
           DigestFromFile_file_Batch:function (strinitParam,strfilename) { 
              var strfilename = strfilename.replace(/\\/g,'\\\\');                   
              var DigestFromFile_BatchCmd ="{\"name\": \"BatchCmd\", "+
                                               "\"Items\": [{\"name\": \"RegisterParam\", \"p1\": \""+strinitParam+"\"},"+
                                                      "{\"name\": \"DigestFromFile\", \"p1\": \""+strfilename+"\"}]}"; 
              return _Getretvalue(DigestFromFile_BatchCmd);
           },


            //Signed EnvelopEx File
            CreateSignedEnvelopEx_file_Batch: function (strinitParam,types,strSignCertType,strSignDN,strSignSN,strSignEmail,strSignDNIssuer,strSignCertBase64,strEnvCertType,strEnvDN,strEnvSN,strEnvEmail,strEnvDNIssuer,strEnvCertBase64,fileNameUseUTF8,strSignCertDN,strEncCertDN,strFileName,strFileNameOut) {    
              var strFileName = strFileName.replace(/\\/g,'\\\\');   
              var strFileNameOut = strFileNameOut.replace(/\\/g,'\\\\');             
              var CreateSignedEnvelopEx_BatchCmd ="{\"name\": \"BatchCmd\", "+
                                          "\"Items\": [{\"name\": \"RegisterParam\", \"p1\": \""+strinitParam+"\"},"+
                                                      "{\"name\": \"SetCertChooseType\", \"p1\": "+types+"},"+
                                                      "{\"name\": \"SetCert\", \"p1\": \""+strSignCertType+"\", \"p2\": \""+strSignDN+"\", \"p3\": \""+strSignSN+"\", \"p4\": \""+strSignEmail+"\", \"p5\": \""+strSignDNIssuer+"\", \"p6\": \""+strSignCertBase64+"\"},"+
                                                      "{\"name\": \"SetCert\", \"p1\": \""+strEnvCertType+"\", \"p2\": \""+strEnvDN+"\", \"p3\": \""+strEnvSN+"\", \"p4\": \""+strEnvEmail+"\", \"p5\": \""+strEnvDNIssuer+"\", \"p6\": \""+strEnvCertBase64+"\"},"+
                                                      "{\"name\": \"SetFileNameUseUTF8\", \"p1\": "+fileNameUseUTF8+"},"+
                                                      "{\"name\": \"CreateSignedEnvelopEx\", \"p1\": \""+strSignCertDN+"\", \"p2\": \""+strEncCertDN+"\", \"p3\": \""+strFileName+"\", \"p4\": \""+strFileNameOut+"\"}]}";                                                     
              return _Getretvalue(CreateSignedEnvelopEx_BatchCmd) ;
           },  

           // VerifySignedEnvelopEx File
           
           VerifySignedEnvelopEx_file_Batch:function(strinitParam,fileNameUseUTF8,strFileName,strFileNameOut){
              var strFileName = strFileName.replace(/\\/g,'\\\\');   
              var strFileNameOut = strFileNameOut.replace(/\\/g,'\\\\');             
              var VerifySignedEnvelopEx_BatchCmd ="{\"name\": \"BatchCmd\", "+
                                               "\"Items\": [{\"name\": \"RegisterParam\", \"p1\": \""+strinitParam+"\"},"+
                                                      "{\"name\": \"SetFileNameUseUTF8\", \"p1\": "+fileNameUseUTF8+"},"+
                                                      "{\"name\": \"VerifySignedEnvelopEx\", \"p1\": \""+strFileName+"\"},"+
                                                      "{\"name\": \"GetFile\", \"p1\": \""+strFileNameOut+"\"}]}";                                                    
              return _Getretvalue(VerifySignedEnvelopEx_BatchCmd) ;
           },

             // VerifySignedEnvelopEx File
           VerifySignedEnvelop_file_Batch:function(strinitParam,fileNameUseUTF8,strSignEnvelopData,strFileNameOut){  
              var strFileNameOut = strFileNameOut.replace(/\\/g,'\\\\');             
              var VerifySignedEnvelop_BatchCmd ="{\"name\": \"BatchCmd\", "+
                                               "\"Items\": [{\"name\": \"RegisterParam\", \"p1\": \""+strinitParam+"\"},"+
                                                      "{\"name\": \"SetFileNameUseUTF8\", \"p1\": "+fileNameUseUTF8+"},"+
                                                      "{\"name\": \"VerifySignedEnvelop\", \"p1\": \""+strSignEnvelopData+"\"},"+
                                                      "{\"name\": \"GetFile\", \"p1\": \""+strFileNameOut+"\"}]}";                                                    
              return _Getretvalue(VerifySignedEnvelop_BatchCmd) ;
           },

             //JITSignEnvelopeFromFile_BigData_Batch
            JITSignEnvelopeFromFile_BigData_file_Batch: function (strinitParam,types,fileNameUseUTF8,strSignCertType,strSignDN,strSignSN,strSignEmail,strSignDNIssuer,strSignCertBase64,strEnvCertType,strEnvDN,strEnvSN,strEnvEmail,strEnvDNIssuer,strEnvCertBase64,strSignCertDN,strEncCertDN,strFileName,strFileNameOut) {    
              var strFileName = strFileName.replace(/\\/g,'\\\\');   
              var strFileNameOut = strFileNameOut.replace(/\\/g,'\\\\');             
              var JITSignEnvelopeFromFile_BigData_BatchCmd ="{\"name\": \"BatchCmd\", "+
                                          "\"Items\": [{\"name\": \"RegisterParam\", \"p1\": \""+strinitParam+"\"},"+
                                                      "{\"name\": \"SetCertChooseType\", \"p1\": "+types+"},"+
                                                      "{\"name\": \"SetFileNameUseUTF8\", \"p1\": "+fileNameUseUTF8+"},"+
                                                      "{\"name\": \"SetCert\", \"p1\": \""+strSignCertType+"\", \"p2\": \""+strSignDN+"\", \"p3\": \""+strSignSN+"\", \"p4\": \""+strSignEmail+"\", \"p5\": \""+strSignDNIssuer+"\", \"p6\": \""+strSignCertBase64+"\"},"+
                                                      "{\"name\": \"SetCert\", \"p1\": \""+strEnvCertType+"\", \"p2\": \""+strEnvDN+"\", \"p3\": \""+strEnvSN+"\", \"p4\": \""+strEnvEmail+"\", \"p5\": \""+strEnvDNIssuer+"\", \"p6\": \""+strEnvCertBase64+"\"},"+
                                                      "{\"name\": \"JITSignEnvelopeFromFile_BigData\", \"p1\": \""+strSignCertDN+"\", \"p2\": \""+strEncCertDN+"\", \"p3\": \""+strFileName+"\", \"p4\": \""+strFileNameOut+"\"}]}";                                                     
              return _Getretvalue(JITSignEnvelopeFromFile_BigData_BatchCmd) ;
           },  


           //JITDecryptSignEnvelopeFromFile_BigData
           JITDecryptSignEnvelopeFromFile_BigData_file_Batch:function(strinitParam,fileNameUseUTF8,strFileName,strFileNameOut){  
              var strFileName = strFileName.replace(/\\/g,'\\\\');   
              var strFileNameOut = strFileNameOut.replace(/\\/g,'\\\\');                
              var JITDecryptSignEnvelopeFromFile_BigData_BatchCmd ="{\"name\": \"BatchCmd\", "+
                                               "\"Items\": [{\"name\": \"RegisterParam\", \"p1\": \""+strinitParam+"\"},"+
                                                      "{\"name\": \"SetFileNameUseUTF8\", \"p1\": "+fileNameUseUTF8+"},"+
                                                      "{\"name\": \"JITDecryptSignEnvelopeFromFile_BigData\", \"p1\": \""+strFileName+"\",\"p2\": \""+strFileNameOut+"\"}]}";                                                    
              return _Getretvalue(JITDecryptSignEnvelopeFromFile_BigData_BatchCmd) ;
           },


           // SymmetricEncryptFrom File
           SymmetricEncryptFromFile_file_Batch:function(strinitParam,strHashAlg,strEncAlg,strSymmetricKey,strFileName,strFileNameOut,isPad){
              var strFileName = strFileName.replace(/\\/g,'\\\\');   
              var strFileNameOut = strFileNameOut.replace(/\\/g,'\\\\');             
              var SymmetricEncryptFromFile_BatchCmd ="{\"name\": \"BatchCmd\", "+
                                          "\"Items\": [{\"name\": \"RegisterParam\", \"p1\": \""+strinitParam+"\"},"+
                                                     "{\"name\": \"SetAlgorithm\", \"p1\": \""+strHashAlg+"\", \"p2\": \""+strEncAlg+"\"},"+
                                                      "{\"name\": \"SymmetricEncryptFromFile\", \"p1\": \""+strSymmetricKey+"\", \"p2\": \""+strFileName+"\", \"p3\": \""+strFileNameOut+"\", \"p4\": "+isPad+"}]}";                                                     
              return _Getretvalue(SymmetricEncryptFromFile_BatchCmd) ;
           },
             // SymmetricDecryptFromFile
           SymmetricDecryptFromFile_file_Batch:function(strinitParam,strHashAlg,strEncAlg,strSymmetricKey,strFileName,strFileNameOut,isPad){
              debugger
              var strFileName = strFileName.replace(/\\/g,'\\\\');   
              var strFileNameOut = strFileNameOut.replace(/\\/g,'\\\\');             
              var SymmetricDecryptFromFile_BatchCmd ="{\"name\": \"BatchCmd\", "+
                                          "\"Items\": [{\"name\": \"RegisterParam\", \"p1\": \""+strinitParam+"\"},"+
                                                     "{\"name\": \"SetAlgorithm\", \"p1\": \""+strHashAlg+"\", \"p2\": \""+strEncAlg+"\"},"+
                                                      "{\"name\": \"SymmetricDecryptFromFile\", \"p1\": \""+strSymmetricKey+"\", \"p2\": \""+strFileName+"\", \"p3\": \""+strFileNameOut+"\", \"p4\": "+isPad+"}]}";                                                     
              return _Getretvalue(SymmetricDecryptFromFile_BatchCmd) ;
           },



            //S2EncryptEnvelop File
            S2EncryptEnvelop_file_Batch: function (strinitParam,types,strCertType,strDN,strSN,strEmail,strDNIssuer,strCertBase64,fileNameUseUTF8,strdn,strFileName,strFileNameOut1,strFileNameOut2) {    
              var strFileName = strFileName.replace(/\\/g,'\\\\');   
              var strFileNameOut1 = strFileNameOut1.replace(/\\/g,'\\\\');  
              var strFileNameOut2 = strFileNameOut2.replace(/\\/g,'\\\\');            
              var S2EncryptEnvelop_BatchCmd ="{\"name\": \"BatchCmd\", "+
                                          "\"Items\": [{\"name\": \"RegisterParam\", \"p1\": \""+strinitParam+"\"},"+
                                                      "{\"name\": \"SetCertChooseType\", \"p1\": "+types+"},"+
                                                      "{\"name\": \"SetCert\", \"p1\": \""+strCertType+"\", \"p2\": \""+strDN+"\", \"p3\": \""+strSN+"\", \"p4\": \""+strEmail+"\", \"p5\": \""+strDNIssuer+"\", \"p6\": \""+strCertBase64+"\"},"+
                                                      "{\"name\": \"SetFileNameUseUTF8\", \"p1\": "+fileNameUseUTF8+"},"+
                                                      "{\"name\": \"S2EncryptEnvelop\", \"p1\": \""+strdn+"\", \"p2\": \""+strFileName+"\",\"p3\": \""+strFileNameOut1+"\",\"p4\": \""+ strFileNameOut2 +"\"}]}";                                                     
              return _Getretvalue(S2EncryptEnvelop_BatchCmd);
           },


            //S2UnEncryptEnvelop file 
             S2UnEncryptEnvelop_file_Batch: function (strinitParam,fileNameUseUTF8,strFileName1,strFileName2,strFileNameOut) {    
              var strFileName1 = strFileName1.replace(/\\/g,'\\\\');   
              var strFileName2 = strFileName2.replace(/\\/g,'\\\\');  
              var strFileNameOut = strFileNameOut.replace(/\\/g,'\\\\');            
              var S2UnEncryptEnvelop_BatchCmd ="{\"name\": \"BatchCmd\", "+
                                          "\"Items\": [{\"name\": \"RegisterParam\", \"p1\": \""+strinitParam+"\"},"+
                                                      "{\"name\": \"SetFileNameUseUTF8\", \"p1\": "+fileNameUseUTF8+"},"+
                                                      "{\"name\": \"S2UnEncryptEnvelop\", \"p1\": \""+strFileName1+"\", \"p2\": \""+strFileName2+"\",\"p3\": \""+strFileNameOut+"\"}]}";                                                     
              return _Getretvalue(S2UnEncryptEnvelop_BatchCmd);
           },

           //s2envelop_big_multicert_batch
            S2EncryptEnvelop_multicert_file_twocert_Batch: function (strinitParam,types,DSign_Cert,DSign_Cert1,DSign_Cert2,fileNameUseUTF8,strdn,strFileName,strFileNameOut1,strFileNameOut2) {    
              var strFileName = strFileName.replace(/\\/g,'\\\\');   
              var strFileNameOut1 = strFileNameOut1.replace(/\\/g,'\\\\');  
              var strFileNameOut2 = strFileNameOut2.replace(/\\/g,'\\\\');            
              var S2EncryptEnvelop_BatchCmd ="{\"name\": \"BatchCmd\", "+
                                          "\"Items\": [{\"name\": \"RegisterParam\", \"p1\": \""+strinitParam+"\"},"+
                                                      "{\"name\": \"SetCertChooseType\", \"p1\": "+types+"},"+
                                                      "{\"name\": \"SetCertByBase64Ex\", \"p1\": \""+DSign_Cert+"\"},"+
                                                      "{\"name\": \"SetCertByBase64Ex\", \"p1\": \""+DSign_Cert1+"\"},"+
                                                      "{\"name\": \"SetCertByBase64Ex\", \"p1\": \""+DSign_Cert2+"\"},"+
                                                      "{\"name\": \"SetFileNameUseUTF8\", \"p1\": "+fileNameUseUTF8+"},"+
                                                      "{\"name\": \"S2EncryptEnvelop\", \"p1\": \""+strdn+"\", \"p2\": \""+strFileName+"\",\"p3\": \""+strFileNameOut1+"\",\"p4\": \""+ strFileNameOut2 +"\"}]}";                                                     
              return _Getretvalue(S2EncryptEnvelop_BatchCmd);
           },

            //s2envelop_big_multicert_batch 一个cert
            S2EncryptEnvelop_multicert_file_Batch: function (strinitParam,types,DSign_Cert,DSign_Cert1,fileNameUseUTF8,strdn,strFileName,strFileNameOut1,strFileNameOut2) {    
              var strFileName = strFileName.replace(/\\/g,'\\\\');   
              var strFileNameOut1 = strFileNameOut1.replace(/\\/g,'\\\\');  
              var strFileNameOut2 = strFileNameOut2.replace(/\\/g,'\\\\');            
              var S2EncryptEnvelop_BatchCmd ="{\"name\": \"BatchCmd\", "+
                                          "\"Items\": [{\"name\": \"RegisterParam\", \"p1\": \""+strinitParam+"\"},"+
                                                      "{\"name\": \"SetCertChooseType\", \"p1\": "+types+"},"+
                                                      "{\"name\": \"SetCertByBase64Ex\", \"p1\": \""+DSign_Cert+"\"},"+
                                                      "{\"name\": \"SetCertByBase64Ex\", \"p1\": \""+DSign_Cert1+"\"},"+
                                                      "{\"name\": \"SetFileNameUseUTF8\", \"p1\": "+fileNameUseUTF8+"},"+
                                                      "{\"name\": \"S2EncryptEnvelop\", \"p1\": \""+strdn+"\", \"p2\": \""+strFileName+"\",\"p3\": \""+strFileNameOut1+"\",\"p4\": \""+ strFileNameOut2 +"\"}]}";                                                     
              return _Getretvalue(S2EncryptEnvelop_BatchCmd);
           },


            // senvelop_big File
            SEncryptEnvelop_file_Batch: function (strinitParam,fileNameUseUTF8,types,strCertType,strDN,strSN,strEmail,strDNIssuer,strCertBase64,strdn,strFileName,strFileNameOut1) {    
              var strFileName = strFileName.replace(/\\/g,'\\\\');   
              var strFileNameOut1 = strFileNameOut1.replace(/\\/g,'\\\\');        
              var SEncryptEnvelop_BatchCmd ="{\"name\": \"BatchCmd\", "+
                                          "\"Items\": [{\"name\": \"RegisterParam\", \"p1\": \""+strinitParam+"\"},"+
                                                      "{\"name\": \"SetCertChooseType\", \"p1\": "+types+"},"+
                                                      "{\"name\": \"SetCert\", \"p1\": \""+strCertType+"\", \"p2\": \""+strDN+"\", \"p3\": \""+strSN+"\", \"p4\": \""+strEmail+"\", \"p5\": \""+strDNIssuer+"\", \"p6\": \""+strCertBase64+"\"},"+
                                                      "{\"name\": \"SetFileNameUseUTF8\", \"p1\": "+fileNameUseUTF8+"},"+
                                                      "{\"name\": \"SEncryptEnvelop\", \"p1\": \""+strdn+"\", \"p2\": \""+strFileName+"\",\"p3\": \""+strFileNameOut1+"\"}]}";                                                     
              return _Getretvalue(SEncryptEnvelop_BatchCmd);
           },


            //SUnEncryptEnvelop Batch 
             SUnEncryptEnvelop_file_Batch: function (strinitParam,fileNameUseUTF8,strFileNamein,strFileNameOut) {    
              var strFileNamein = strFileNamein.replace(/\\/g,'\\\\');   
              var strFileNameOut = strFileNameOut.replace(/\\/g,'\\\\');            
              var SUnEncryptEnvelop_BatchCmd ="{\"name\": \"BatchCmd\", "+
                                          "\"Items\": [{\"name\": \"RegisterParam\", \"p1\": \""+strinitParam+"\"},"+
                                                      "{\"name\": \"SetFileNameUseUTF8\", \"p1\": "+fileNameUseUTF8+"},"+
                                                      "{\"name\": \"SUnEncryptEnvelop\", \"p1\": \""+strFileNamein+"\", \"p2\": \""+strFileNameOut+"\"}]}";                                                     
              return _Getretvalue(SUnEncryptEnvelop_BatchCmd);
           },

            //senvelop_big_multicert_batch
            SEncryptEnvelop_multicert_file_twocert_Batch: function (strinitParam,types,DSign_Cert,DSign_Cert1,DSign_Cert2,fileNameUseUTF8,strdn,strFileName,strFileNameOut1) {    
              var strFileName = strFileName.replace(/\\/g,'\\\\');   
              var strFileNameOut1 = strFileNameOut1.replace(/\\/g,'\\\\');             
              var SEncryptEnvelop_BatchCmd ="{\"name\": \"BatchCmd\", "+
                                          "\"Items\": [{\"name\": \"RegisterParam\", \"p1\": \""+strinitParam+"\"},"+
                                                      "{\"name\": \"SetCertChooseType\", \"p1\": "+types+"},"+
                                                      "{\"name\": \"SetCertByBase64Ex\", \"p1\": \""+DSign_Cert+"\"},"+
                                                      "{\"name\": \"SetCertByBase64Ex\", \"p1\": \""+DSign_Cert1+"\"},"+
                                                      "{\"name\": \"SetCertByBase64Ex\", \"p1\": \""+DSign_Cert2+"\"},"+
                                                      "{\"name\": \"SetFileNameUseUTF8\", \"p1\": "+fileNameUseUTF8+"},"+
                                                      "{\"name\": \"SEncryptEnvelop\", \"p1\": \""+strdn+"\", \"p2\": \""+strFileName+"\",\"p3\": \""+strFileNameOut1+"\"}]}";                                                     
              return _Getretvalue(SEncryptEnvelop_BatchCmd);
           },

            //senvelop_big_multicert_batch 一个证书
            SEncryptEnvelop_multicert_file_Batch: function (strinitParam,types,DSign_Cert,DSign_Cert1,fileNameUseUTF8,strdn,strFileName,strFileNameOut1) {    
              var strFileName = strFileName.replace(/\\/g,'\\\\');   
              var strFileNameOut1 = strFileNameOut1.replace(/\\/g,'\\\\');             
              var SEncryptEnvelop_BatchCmd ="{\"name\": \"BatchCmd\", "+
                                          "\"Items\": [{\"name\": \"RegisterParam\", \"p1\": \""+strinitParam+"\"},"+
                                                      "{\"name\": \"SetCertChooseType\", \"p1\": "+types+"},"+
                                                      "{\"name\": \"SetCertByBase64Ex\", \"p1\": \""+DSign_Cert+"\"},"+
                                                      "{\"name\": \"SetCertByBase64Ex\", \"p1\": \""+DSign_Cert1+"\"},"+
                                                      "{\"name\": \"SetFileNameUseUTF8\", \"p1\": "+fileNameUseUTF8+"},"+
                                                      "{\"name\": \"SEncryptEnvelop\", \"p1\": \""+strdn+"\", \"p2\": \""+strFileName+"\",\"p3\": \""+strFileNameOut1+"\"}]}";                                                     
              return _Getretvalue(SEncryptEnvelop_BatchCmd);
           },

            /******file  batch end*****/
           MOF_SetFlag: function (types) {
           		var MOFSetFlagCmd = "{\"name\": \"MOF_SetFlag\", \"p1\": "+types+"}";
           		return _Getretcode(MOFSetFlagCmd);	
           }, 
           MOF_DetachSignStr: function (strdn,iscert,strsrc,strserverinfo) {
           	  var MOFDetachSignStrCmd = "{\"name\": \"MOF_DetachSignStr\", \"p1\": \""+strdn+"\", \"p2\": "+iscert+", \"p3\": \""+strsrc+"\", \"p4\": \""+strserverinfo+"\"}";
           		return _Getretmsg(MOFDetachSignStrCmd);
           },     
           MOF_VerifyDetachedSignStr: function (strSignedData,strsrc) {
           	  var MOFVerifyDetachedSignStrCmd = "{\"name\": \"MOF_VerifyDetachedSignStr\", \"p1\": \""+strSignedData+"\", \"p2\": \""+strsrc+"\"}";
           		return _Getretcode(MOFVerifyDetachedSignStrCmd);
           },
           MOF_EncryptEnvelopStr: function (strdn,strsrc,strserverinfo) {
           	  var MOFEncryptEnvelopStrCmd = "{\"name\": \"MOF_EncryptEnvelopStr\", \"p1\": \""+strdn+"\", \"p2\": \""+strsrc+"\", \"p3\": \""+strserverinfo+"\"}";
           		return _Getretmsg(MOFEncryptEnvelopStrCmd);
           },
           MOF_DecryptEnvelop: function (strEnvelop) {
           	  var MOFDecryptEnvelopStrCmd = "{\"name\": \"MOF_DecryptEnvelop\", \"p1\": \""+strEnvelop+"\"}";
           		return _Getretcode(MOFDecryptEnvelopStrCmd);
           },     
           GetKeyDevInfoByCertSN: function (strdn, ntype) {
              var GetKeyDevInfoByCertSNCmd = "{\"name\": \"GetKeyDevInfoByCertSN\", \"p1\": \""+strdn+"\", \"p2\": "+ntype+"}";
              return _Getretmsg(GetKeyDevInfoByCertSNCmd);
           },
           GetKeyDevInfo: function () {
              var GetKeyDevInfoCmd = "{\"name\": \"GetKeyDevInfo\"}";
              return _Getretmsg(GetKeyDevInfoCmd);
           },      
           //file           
           DigestFromFile: function (strSrcFileName) {  
           	//  var strFileName = strSrcFileName.replace(/\\/g,'\\\\');         	  
           	  var DigestFromFileCmd = {name:"DigestFromFile",p1:strFileName};
			  var DigestFromFileCmdJson = JSON.stringify(DigestFromFileCmd);//转换为json字符串
           		return _Getretmsg(DigestFromFileCmdJson);
           },
           SetFileNameUseUTF8: function (isUTF8) {          	  
           	  var SetFileNameUseUTF8Cmd = "{\"name\": \"SetFileNameUseUTF8\", \"p1\": "+isUTF8+"}";
           		return _Getretcode(SetFileNameUseUTF8Cmd);
           },
           AttachSignEx: function (strDN, strFileName, strFileNameOut) {
           	  var strFileName1 = strFileName.replace(/\\/g,'\\\\');   
           	  var strFileName2 = strFileNameOut.replace(/\\/g,'\\\\');             	  
           	  var AttachSignExCmd = "{\"name\": \"AttachSignEx\", \"p1\": \""+strDN+"\", \"p2\": \""+strFileName1+"\", \"p3\": \""+strFileName2+"\"}";
           		return _Getretmsg(AttachSignExCmd);
           },
           VerifyAttachedSignEx: function (strFileNameAttached) {
           	  var strFileName = strFileNameAttached.replace(/\\/g,'\\\\');   
           	  var VerifyAttachedSignCmd = "{\"name\": \"VerifyAttachedSignEx\", \"p1\": \""+strFileName+"\"}";
           		return _Getretcode(VerifyAttachedSignCmd);
           },
           GetFile: function (strFileSavePath) {
           	  var strFileName = strFileSavePath.replace(/\\/g,'\\\\');   
           	  var GetFileCmd = "{\"name\": \"GetFile\", \"p1\": \""+strFileName+"\"}";
           		return _Getretmsg(GetFileCmd);
           },
           JITVerifyAttachFromFile_BigData: function (strInFileName, strOutFilePath) {
           	  var strFileName1 = strInFileName.replace(/\\/g,'\\\\');   
           	  var strFileName2 = strOutFilePath.replace(/\\/g,'\\\\'); 
           	  var JITVerifyAttachFromFile_BigDataCmd = "{\"name\": \"JITVerifyAttachFromFile_BigData\", \"p1\": \""+strFileName1+"\", \"p2\": \""+strFileName2+"\"}";
           		return _Getretcode(JITVerifyAttachFromFile_BigDataCmd);
           },
           JITAttachFromFile_BigData: function (strCertDN, strSrcFileName, strOutFileName) {
           	  var strFileName1 = strSrcFileName.replace(/\\/g,'\\\\');   
           	  var strFileName2 = strOutFileName.replace(/\\/g,'\\\\'); 
           	  var JITAttachFromFile_BigDataCmd = "{\"name\": \"JITAttachFromFile_BigData\", \"p1\": \""+strCertDN+"\", \"p2\": \""+strFileName1+"\", \"p3\": \""+strFileName2+"\"}";
           		return _Getretcode(JITAttachFromFile_BigDataCmd);
           },
           DetachSignEx: function (strDN, strFileName, strFileNameOut) {
           	//  var strFileName1 = strFileName.replace(/\\/g,'\\\\');   
           	//  var strFileName2 = strFileNameOut.replace(/\\/g,'\\\\');             	  
           	  var DetachSignExCmd = {name:"DetachSignEx",p1:strDN, p2:strFileName, p3:strFileNameOut};
			  var DetachSignExCmdJson = JSON.stringify(DetachSignExCmd);//转换为json字符串
           		return _Getretmsg(DetachSignExCmdJson);
           },
           JITDetachFromFile_BigData: function (strCertDN, strSrcFileName, strOutFileName) {
			//  var strFileName1 = strSrcFileName.replace(/\\/g,'\\\\');   
           	//  var strFileName2 = strOutFileName.replace(/\\/g,'\\\\'); 
           	  var JITDetachFromFile_BigDataCmd = {name:"JITDetachFromFile_BigData",p1:strCertDN, p2:strSrcFileName, p3:strOutFileName};
			  var JITDetachFromFile_BigDataCmdJson = JSON.stringify(JITDetachFromFile_BigDataCmd);//转换为json字符串
           		return _Getretcode(JITDetachFromFile_BigDataCmdJson);
           },
           JITDetachFromFile_BigData_Val: function (strCertDN, strSrcFileName, strOutFileName) {
           	//  var strFileName1 = strSrcFileName.replace(/\\/g,'\\\\');   
           	//  var strFileName2 = strOutFileName.replace(/\\/g,'\\\\'); 
           	  var JITDetachFromFile_BigData_ValCmd = {name:"JITDetachFromFile_BigData_Val",p1:strCertDN, p2:strSrcFileName, p3:strOutFileName};
			  var JITDetachFromFile_BigData_ValCmdJson = JSON.stringify(JITDetachFromFile_BigData_ValCmd);//转换为json字符串
           		return _Getretmsg(JITDetachFromFile_BigData_ValCmdJson);
           },
           VerifyDetachedSignEx: function (strSignedData, strFileNameDetached, strFileName) {
           	  var strFileName1 = strFileNameDetached.replace(/\\/g,'\\\\');   
           	  var strFileName2 = strFileName.replace(/\\/g,'\\\\'); 
           	  var VerifyDetachedSignExCmd = "{\"name\": \"VerifyDetachedSignEx\", \"p1\": \""+strSignedData+"\", \"p2\": \""+strFileName1+"\", \"p3\": \""+strFileName2+"\"}";
           		return _Getretcode(VerifyDetachedSignExCmd);
           },
           JITVerifyDetachFromFile_BigData: function (strSrcFileName, strSignFileName) {
           	  var strFileName1 = strSrcFileName.replace(/\\/g,'\\\\');   
           	  var strFileName2 = strSignFileName.replace(/\\/g,'\\\\'); 
           	  var JITVerifyDetachFromFile_BigDataCmd = "{\"name\": \"JITVerifyDetachFromFile_BigData\", \"p1\": \""+strFileName1+"\", \"p2\": \""+strFileName2+"\"}";
           		return _Getretcode(JITVerifyDetachFromFile_BigDataCmd);
           },
           CreateSignedEnvelopEx: function (strSignCertDN, strEncCertDN, strFileName, strFileNameOut) {
           	//  var strFileName1 = strFileName.replace(/\\/g,'\\\\');   
           	//  var strFileName2 = strFileNameOut.replace(/\\/g,'\\\\');             	  
           	  var CreateSignedEnvelopExCmd = {name:"CreateSignedEnvelopEx",p1:strSignCertDN, p2:strEncCertDN, p3:strFileName, p4:strFileNameOut};
			  var CreateSignedEnvelopExCmdJson = JSON.stringify(CreateSignedEnvelopExCmd);//转换为json字符串
           		return _Getretmsg(CreateSignedEnvelopExCmdJson);
           },
           JITSignEnvelopeFromFile_BigData: function (strSignCertDN, strEncCertDN, strSrcFileName, strOutFileName) {
           	//  var strFileName1 = strSrcFileName.replace(/\\/g,'\\\\');   
           	//  var strFileName2 = strOutFileName.replace(/\\/g,'\\\\');             	  
           	  var JITSignEnvelopeFromFile_BigDataCmd = {name:"JITSignEnvelopeFromFile_BigData",p1:strSignCertDN, p2:strEncCertDN, p3:strSrcFileName, p4:strOutFileName};
			  var JITSignEnvelopeFromFile_BigDataCmdJson = JSON.stringify(JITSignEnvelopeFromFile_BigDataCmd);//转换为json字符串
           		return _Getretmsg(JITSignEnvelopeFromFile_BigDataCmdJson);
           },
           VerifySignedEnvelopEx: function (strEvpFile) {
           	  var strFileName = strEvpFile.replace(/\\/g,'\\\\');  
           	  var VerifySignedEnvelopExCmd = "{\"name\": \"VerifySignedEnvelopEx\", \"p1\": \""+strFileName+"\"}";
           		return _Getretcode(VerifySignedEnvelopExCmd);	
           },
           JITDecryptSignEnvelopeFromFile_BigData: function (strInFileName, strOutFilePath) {
           	  var strFileName1 = strInFileName.replace(/\\/g,'\\\\');   
           	  var strFileName2 = strOutFilePath.replace(/\\/g,'\\\\'); 
           	  var JITDecryptSignEnvelopeFromFile_BigDataCmd = "{\"name\": \"JITDecryptSignEnvelopeFromFile_BigData\", \"p1\": \""+strFileName1+"\", \"p2\": \""+strFileName2+"\"}";
           		return _Getretcode(JITDecryptSignEnvelopeFromFile_BigDataCmd);
           },
           SymmetricEncryptFromFile: function (strSymmetricKey, strSrcFileName, strEncryptFileName,  isPad) {
            //  var strFileName1 = strSrcFileName.replace(/\\/g,'\\\\');   
            //  var strFileName2 = strEncryptFileName.replace(/\\/g,'\\\\');                
              var SymmetricEncryptFromFileCmd = {name:"SymmetricEncryptFromFile",p1:strSymmetricKey, p2:strSrcFileName, p3:strEncryptFileName, p4:isPad};
              var SymmetricEncryptFromFileCmdJson = JSON.stringify(SymmetricEncryptFromFileCmd);//杞崲涓簀son瀛楃涓�
              return _Getretcode(SymmetricEncryptFromFileCmdJson);
           },
           SymmetricDecryptFromFile: function (strSymmetricKey, strEncryptFileName, strSrcFileName,  isPad ) {
            //  var strFileName1 = strEncryptFileName.replace(/\\/g,'\\\\');   
            //  var strFileName2 = strSrcFileName.replace(/\\/g,'\\\\');                
              var SymmetricDecryptFromFileCmd = {name:"SymmetricDecryptFromFile",p1:strSymmetricKey, p2:strEncryptFileName, p3:strSrcFileName, p4:isPad};
              var SymmetricDecryptFromFileCmdJson = JSON.stringify(SymmetricDecryptFromFileCmd);//杞崲涓簀son瀛楃涓�
              return _Getretcode(SymmetricDecryptFromFileCmdJson);
           },      
           EncryptEnvelopEx: function (strDN, strFileName, strFileNameOut) {
           	//  var strFileName1 = strFileName.replace(/\\/g,'\\\\');   
           	//  var strFileName2 = strFileNameOut.replace(/\\/g,'\\\\');             	  
           	  var EncryptEnvelopExCmd = {name:"EncryptEnvelopEx",p1:strDN, p2:strFileName, p3:strFileNameOut};
			  var EncryptEnvelopExCmdJson = JSON.stringify(EncryptEnvelopExCmd);//转换为json字符串
           		return _Getretmsg(EncryptEnvelopExCmdJson);
           },
           DecryptEnvelopEx: function (strFileName) {
           	  var strFileName = strFileName.replace(/\\/g,'\\\\');               	  
           	  var DecryptEnvelopExCmd = "{\"name\": \"DecryptEnvelopEx\", \"p1\": \""+strFileName+"\"}";
           		return _Getretcode(DecryptEnvelopExCmd);
           },
		   Http_Batch: function (str) {	           	  
          
           		return _Getretvalue(str);
           },
           JITCreateEnvelopeFromFile_BigData: function (strDN, strFileName, strFileNameOut) {
           	//  var strFileName1 = strFileName.replace(/\\/g,'\\\\');   
           	//  var strFileName2 = strFileNameOut.replace(/\\/g,'\\\\');             	  
           	  var JITCreateEnvelopeFromFile_BigDataCmd = {name:"JITCreateEnvelopeFromFile_BigData",p1:strDN, p2:strFileName, p3:strFileNameOut};
			  var JITCreateEnvelopeFromFile_BigDataCmdJson = JSON.stringify(JITCreateEnvelopeFromFile_BigDataCmd);//转换为json字符串	
           		return _Getretcode(JITCreateEnvelopeFromFile_BigDataCmdJson);
           },
           JITDecryptEnvelopeFromFile_BigData: function (strInFileName, strOutFilePath) {
           	  var strFileName1 = strInFileName.replace(/\\/g,'\\\\');   
           	  var strFileName2 = strOutFilePath.replace(/\\/g,'\\\\'); 
           	  var JITDecryptEnvelopeFromFile_BigDataCmd = "{\"name\": \"JITDecryptEnvelopeFromFile_BigData\", \"p1\": \""+strFileName1+"\", \"p2\": \""+strFileName2+"\"}";
           		return _Getretcode(JITDecryptEnvelopeFromFile_BigDataCmd);
           },
           SEncryptEnvelop: function (strCertDN, strSrcFileName, strOutFileName) {
           	//  var strFileName1 = strSrcFileName.replace(/\\/g,'\\\\');   
           	//  var strFileName2 = strOutFileName.replace(/\\/g,'\\\\');             	  
           	  var SEncryptEnvelopCmd = {name:"SEncryptEnvelop",p1:strCertDN, p2:strSrcFileName, p3:strOutFileName};
			  var SEncryptEnvelopCmdJson = JSON.stringify(SEncryptEnvelopCmd);//转换为json字符串
           		return _Getretcode(SEncryptEnvelopCmdJson);
           },
           SUnEncryptEnvelop: function (strInFileName, strOutFileName) {
           	//  var strFileName1 = strInFileName.replace(/\\/g,'\\\\');   
           	//  var strFileName2 = strOutFileName.replace(/\\/g,'\\\\');             	  
           	  var SUnEncryptEnvelopCmd = {name:"SUnEncryptEnvelop",p1:strInFileName, p2:strOutFileName};
			  var SUnEncryptEnvelopCmdJson = JSON.stringify(SUnEncryptEnvelopCmd);//转换为json字符串
           		return _Getretcode(SUnEncryptEnvelopCmdJson);
           },
           S2EncryptEnvelop: function (strCertDN, strSrcFileName, strOutFileName1, strOutFileName2) {
           	//  var strFileName1 = strSrcFileName.replace(/\\/g,'\\\\');   
           	//  var strFileName2 = strOutFileName1.replace(/\\/g,'\\\\');             	  
           	//  var strFileName3 = strOutFileName2.replace(/\\/g,'\\\\');
           	  var S2EncryptEnvelopCmd = {name:"S2EncryptEnvelop",p1:strCertDN, p2:strSrcFileName, p3:strOutFileName1, p4:strOutFileName2};
			  var S2EncryptEnvelopCmdJson = JSON.stringify(S2EncryptEnvelopCmd);//转换为json字符串
           		return _Getretcode(S2EncryptEnvelopCmdJson);
           },
           S2UnEncryptEnvelop: function (strInFileName1, strInFileName2, strOutFileName) {
           	//  var strFileName1 = strInFileName1.replace(/\\/g,'\\\\');   
           	//  var strFileName2 = strInFileName2.replace(/\\/g,'\\\\');     
           	//  var strFileName3 = strOutFileName.replace(/\\/g,'\\\\');          	  
           	  var S2UnEncryptEnvelopCmd = {name:"S2UnEncryptEnvelop",p1:strInFileName1, p2:strInFileName2, p3:strOutFileName};
			  var S2UnEncryptEnvelopCmdJson = JSON.stringify(S2UnEncryptEnvelopCmd);//转换为json字符串
           		return _Getretcode(S2UnEncryptEnvelopCmdJson);
           },
		   JITGDigestStr: function (strAlg,strSrcData,isBase64) {
           	  var JITGDigestStrCmd = "{\"name\": \"JITGDigestStr\", \"p1\": \""+strAlg+"\", \"p2\": \""+strSrcData+"\", \"p3\": "+isBase64+"}";
           		return _Getretmsg(JITGDigestStrCmd);
           },
           JITGAsymmetricEncryptStr: function (strPublicKey, nIsPublicKeyCert, strSrcData, nIsBase64, nAlgFlag) {
           	  var JITGAsymmetricEncryptStrCmd = "{\"name\": \"JITGAsymmetricEncryptStr\", \"p1\": \""+strPublicKey+"\", \"p2\": "+nIsPublicKeyCert+", \"p3\": \""+strSrcData+"\", \"p4\": "+nIsBase64+", \"p5\": "+nAlgFlag+"}";
           		return _Getretmsg(JITGAsymmetricEncryptStrCmd);
           },
           JITGAsymmetricDecryptStr: function (strPrivatekey, strEnData, nIsBase64, nAlgFlag) {
           	  var JITGAsymmetricDecryptStrCmd = "{\"name\": \"JITGAsymmetricDecryptStr\", \"p1\": \""+strPrivatekey+"\", \"p2\": \""+strEnData+"\", \"p3\": "+nIsBase64+", \"p4\": "+nAlgFlag+"}";
           		return _Getretmsg(JITGAsymmetricDecryptStrCmd);
           },
		   JITGP7EnvelopeStr: function (bstrPunlicKeyCert, bstrSrcData, nSrcDataIsBase64, bstrSymmAlgName,bstrSymmKey,nSymmKeyIsBase64) {
           	  var JITGP7EnvelopeStrCmd = "{\"name\": \"JITGP7EnvelopeStr\", \"p1\": \""+bstrPunlicKeyCert+"\", \"p2\": \""+bstrSrcData+"\", \"p3\": "+nSrcDataIsBase64+", \"p4\": \""+bstrSymmAlgName+"\", \"p5\": \""+bstrSymmKey+"\", \"p6\": "+nSymmKeyIsBase64+"}";
           		return _Getretmsg(JITGP7EnvelopeStrCmd);
           },
		   SymmetricEncrypt2: function (strSymmetricKey, strSrcData, uFlag){ 
           	  var SymmetricEncrypt2Cmd = "{\"name\": \"SymmetricEncrypt2\", \"p1\": \""+strSymmetricKey+"\", \"p2\": \""+strSrcData+"\", \"p3\": "+uFlag+"}";	              		
           		return _Getretmsg(SymmetricEncrypt2Cmd);
           },
           SymmetricDecrypt2: function (strSymmetricKey, strEncryptData, uFlag){ 
           	  var SymmetricDecrypt2Cmd = "{\"name\": \"SymmetricDecrypt2\", \"p1\": \""+strSymmetricKey+"\", \"p2\": \""+strEncryptData+"\", \"p3\": "+uFlag+"}";	              		
           		return _Getretmsg(SymmetricDecrypt2Cmd);
           }
		   
           
           		           
	   }
}();